<?php namespace App;

use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;

/**
 * App\Images
 *
 * @property integer $id
 * @property integer $file_id
 * @property string $img_name
 * @property string $img_type
 * @property string $deleted_at
 * @property \Carbon\Carbon $created_at
 * @property \Carbon\Carbon $updated_at
 * @property-read \App\Files $files
 * @method static \Illuminate\Database\Query\Builder|\App\Images whereId($value)
 * @method static \Illuminate\Database\Query\Builder|\App\Images whereFileId($value)
 * @method static \Illuminate\Database\Query\Builder|\App\Images whereImgName($value)
 * @method static \Illuminate\Database\Query\Builder|\App\Images whereImgType($value)
 * @method static \Illuminate\Database\Query\Builder|\App\Images whereDeletedAt($value)
 * @method static \Illuminate\Database\Query\Builder|\App\Images whereCreatedAt($value)
 * @method static \Illuminate\Database\Query\Builder|\App\Images whereUpdatedAt($value)
 * @property-read \App\InvestOrg $investOrg
 * @property-read \Illuminate\Database\Eloquent\Collection|\App\Project[] $project_x_overview_img
 */
class Images extends Model {

	//表名
    protected $table = 'images' ;
    use SoftDeletes;

    public function files()
    {
        return $this->belongsTo('App\Files' , 'file_id') ;
    }

    /** 关联项目-项目总览 */
    public function project_x_overview_img(){
        return $this->belongsToMany('App\Project' , 'overview_image' , 'img_id' , 'project__id');
    }
}
